#include<iostream>
#include<string>
using namespace std;
string s;
int n;
int main()
{
	cin >> n;
	bool flag = 0;
	string ans = "1";
	int k = 0;
	for (int i = 0; i < n; i++) {
		cin >> s;
		//cout<<"ss=="<<s<<endl;
		bool flag1 = 0;
		if (s == "0")flag = 1;
		if (s == "1")continue;
		if (s[0] - '0' != 1)flag1 = 1;
		else {
			for (int i = 1; i < s.size(); i++) {
				if (s[i] - '0' != 0) {
					flag1 = 1;
					break;
				}
			}
		}
		if (flag1)ans = s;
		else {
			k += s.size() - 1;
		}
	}
	if (flag)cout << 0 << endl;
	else {
		cout << ans;
		for (int i = 0; i < k; i++)cout << 0;
	}
}